package com.zmn.oms.business.interfaces.orderamount;

import com.zmn.oms.common.constant.TriggerAmountChangeEnum;
import com.zmn.oms.common.exception.OmsBaseException;
import com.zmn.oms.model.bo.orderamount.CalcAddOrderAmountDIO;
import com.zmn.oms.model.bo.orderamount.OrderAmountCalcBO;
import com.zmn.oms.model.bo.orderamount.ReCalcOrderAmountDIO;
import com.zmn.oms.model.entity.discount.OrderDiscount;
import com.zmn.oms.model.entity.discount.OrderPayDiscount;
import com.zmn.oms.model.entity.work.OrderWork;

import java.util.List;

/**
 * 类描述：订单金额计算服务
 * @author heciqi
 * @date 2020/6/3 14:01
 */
public interface OrderAmountCalcBService {

	/**
	 * 获取金额计算入参
	 * @param orderWork
	 * @return
	 */
	ReCalcOrderAmountDIO getReCalcOrderAmountDIO(OrderWork orderWork);

	/**
	 * 下单
	 * 计算工单金额和优惠金额
	 * @return
	 */
	OrderAmountCalcBO calcOrderAmountAndDiscountAmount(CalcAddOrderAmountDIO calcOrderAmountDIO, List<OrderDiscount> orderDiscountList, List<OrderPayDiscount> orderPayDiscountList);

	/**
	 * 下单后
	 * 重新计算工单和优惠金额
	 * @param triggerAmountChangeEnum 触发节点
	 * @param reCalcOrderAmountDIO
	 * @return
	 */
	OrderAmountCalcBO reCalcOrderAmountAndDiscountAmount(TriggerAmountChangeEnum triggerAmountChangeEnum, ReCalcOrderAmountDIO reCalcOrderAmountDIO, Integer compulsoryFlag) throws OmsBaseException;

	/**
	 * 重新计算价格
	 * @param reCalcOrderAmountDIO
	 * @return
	 */
	OrderAmountCalcBO reCalcAmount(ReCalcOrderAmountDIO reCalcOrderAmountDIO);
}
